package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

public class BibiliotecaModel {
    private static List<String> menuOptions;
    private static List<Book> books;
    private static List<Movie> movies;
    private static List<User> users;

    static {
        initBooks();
    }

    private static void initBooks() {
        menuOptions = new ArrayList<String>();
        menuOptions.add("view all books");
        menuOptions.add("Reserve Books");
        menuOptions.add("membership details");
        menuOptions.add("view all movies");
        menuOptions.add("log in");

        books = new ArrayList<Book>();
        Book book1 = new Book("vampire diary");
        Book book2 = new Book("the walking dead");
        books.add(book1);
        books.add(book2);

        movies = new ArrayList<Movie>();
        movies.add(new Movie("The Walking Dead", "2010", "Tom", "15"));
        movies.add(new Movie("Super Nature", "2004", "Kate"));

        User.Reset();
        users = new ArrayList<User>();
        users.add(new User("firstUser", "fisrt@thoughtworks.com", "15991260507"));
        users.add(new User("second", "second@thoughtworks.com", "15991260507"));
    }

    public static List<Book> getBooks() {
        return books;
    }

    public static List<String> getMenuOptions() {
        return menuOptions;
    }

    public static List<Movie> getMovies() {
        return movies;
    }

    public static List<User> getUsers() {
        return users;
    }

}
